package com.xh.demo.controller;

import com.xh.demo.commons.model.response.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wen
 * @apiNote TestController
 * @since 2021-12-10
 */
@Slf4j
@RefreshScope
@RestController
@RequestMapping("/test")
public class TestController {

    @Value("${order-describe:UN_KNOW}")
    private String orderDescribe;

    @GetMapping("/index")
    public R<String> index() {
        log.info("【订单描述】【{}】", orderDescribe);
        return R.success(orderDescribe);
    }


}
